import layoutHeaderAside from '@/layout/header-aside'

const meta = { auth: true }

export default {
  path: '/study',
  name: 'Study',
  meta,
  redirect: { name: 'demo-d2-crud-index' },
  component: layoutHeaderAside,
  children: (pre => [{
    path: `chapter`,
    name: `ChapterList`,
    component: () => import('@/pages/study/chapter/'),
    meta: { ...meta, title: '章节' }
  }, {
    path: `chapter/edit/:id?`,
    name: `ChapterEdit`,
    component: () => import('@/pages/study/chapter/edit'),
    meta: { ...meta, title: '章节编辑' }
  }, {
    path: `course`,
    name: `Course`,
    component: () => import('@/pages/study/course/'),
    meta: { ...meta, title: '课程' }
  }, {
    path: `course/edit/:id?`,
    name: `CourseEdit`,
    component: () => import('@/pages/study/course/edit'),
    meta: { ...meta, title: '课程编辑' }
  }, {
    path: `comment`,
    name: `Comment`,
    component: () => import('@/pages/study/comment/'),
    meta: { ...meta, title: '评论' }
  }, {
    path: `category`,
    name: `Category`,
    component: () => import('@/pages/study/category/'),
    meta: { ...meta, title: '课程' }
  }, {
    path: `blockinfo`,
    name: `Blockinfo`,
    component: () => import('@/pages/study/blockinfo/'),
    meta: { ...meta, title: '焦点图' }
  }
  ])('study')
}
